import Vue from 'vue'
import VueRouter from 'vue-router'
import talentM from '../components/Users/talentM.vue'
import showInfor from '../components/Users/showInfor.vue'
import addTalent from '../components/Users/addTalent.vue'
import dailyOperate from '../components/Users/dailyOperate.vue'
import Choose from '../components/Choose.vue'
import Oplogin from '../components/Oplogin.vue'
import Admin from '../components/Oper/Admin.vue'
import Verify from '../components/Oper/Verify.vue'
import New from '../components/Admin/New.vue'
import Check from '../components/Check/Check.vue'
import honor from '../components/Users/honor.vue'
import punish from '../components/Users/punish.vue'
import honorInfor from '../components/Users/honorInfor.vue'

import Appeal from '../components/Check/Appeal.vue'
import Attendance from '../components/Check/Attendance.vue'
import Reputation from '../components/Check/Reputation.vue'
import Discipline from '../components/Check/Discipline.vue'

import punishInfor from '../components/Users/punishInfor.vue'
import letoff from '../components/Users/letoff.vue'
import letoffData from '../components/Users/letoffData.vue'

// 查阅界面
import csLogin from '../components/consult/csLogin.vue'
import csData from '../components/consult/csData.vue'
import changeBasicInfor from '../components/consult/changeBasicInfor.vue'
import stateInfor from '../components/consult/stateInfor.vue'



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/choose'
  },
  {
    path: '/stateInfor',
    component: stateInfor
  },
  {
    path: '/csLogin',
    component: csLogin
  },
  {
    path: '/csData',
    component: csData,
    children: [
      // 查阅界面
      {
        path: '/changeBasicInfor',
        component: changeBasicInfor
      }
    ]
  },
  {
    path: '/choose',
    component: Choose
  },
  {
    path:'/oplogin',
    component:Oplogin
  },
  {
    path:'/admin',
    component:Admin
  },
  {
    path:'/verify',
    component:Verify,
    children:[
      {path:'/check',component:Check},
      {path:'/appeal',component:Appeal},
      {path:'/reputation',component:Reputation},
      {path:'/attendance',component:Attendance},
      {path:'/discipline',component:Discipline}
    ]  
},
  {
    path: '/talentM',
    component: talentM,
    redirect: '/showInfor',
    children:[
      {
        path: '/New',
        component: New
      },
      {
        path: '/showInfor',
        component: showInfor
      },
      {
        path: '/addTalent',
        component: addTalent
      },
      {
        path: '/dailyOperate',
        component: dailyOperate
      },
      {
        path: '/honor',
        component: honor
      },
      {
        path: '/punish',
        component: punish
      },
      {
        path: '/honorInfor',
        component: honorInfor
      },
      {
        path: '/punishInfor',
        component: punishInfor
      },
      {
        path: '/letoff',
        component: letoff
      },
      {
        path: '/letoffData',
        component: letoffData
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
